<template>
  <Tabs v-model="currentTab" class="demo-tabs-style2">
    <TabPane label="竞赛选手管理" name="user">
      <component-user ref="userCompet" v-if="currentTab === 'user'"></component-user>
    </TabPane>
    <TabPane label="竞赛题目管理" name="question">
      <component-question ref="quesCompet" v-if="currentTab === 'question'"></component-question>
    </TabPane>
  </Tabs>
</template>

<script>
import componentUser from './kcCompetPublic/componentUser'
import componentQuestion from './kcCompetPublic/componentQuestion'

export default {
  name: 'knowledgePreManage',
  components: { componentUser, componentQuestion },
  props: {
  },
  data() {
    return {
      currentTab: 'user'
    }
  },
  watch: {
    // currentTab(val) {
    //   switch (val) {
    //     case 'user':
    //       this.$refs.userCompet.resetQuery()
    //       break
    //     case 'question':
    //       this.$refs.quesCompet.resetQuery()
    //       break
    //   }
    // }
  }
}
</script>

<style scoped></style>
